#define  _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
//#include <string.h>
//int main()
//{
//    printf("Name    Age    Gender\n");
//    printf("---------------------\n");
//    printf("Jack    18     man\n");
//    return 0;
//}
int main()
{
	int n = 0;
	int a = 0;
	int b = 0;
	int c = 0;
	int d = 0;
	scanf("%d", &n);
	while (n)
	{
		printf("%d", n%10);
		n= n / 10;
	}
	return 0;
}